@extends('admin.common.admin')
@section('cnt')
    {{-- 面包屑导航 --}}
    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 房源属性管理
        <span class="c-gray en">&gt;</span> 房源属性列表
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
           href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <div class="page-container">
        @include('admin.common.msg')

        <div class="text-c">
            <form>
                日期范围：
                <input type="text" value="{{ request()->get('datemin') }}" autocomplete="off" onfocus="WdatePicker({})"
                       name="datemin" class="input-text Wdate" style="width:120px;">
                -
                <input type="text" value="{{ request()->get('datemax') }}" autocomplete="off" onfocus="WdatePicker({})"
                       name="datemax" class="input-text Wdate" style="width:120px;">
                <input type="text" class="input-text" style="width:250px" value="{{ request()->get('username') }}"
                       placeholder="输入账号" name="username">
                <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i>
                    搜用户
                </button>
            </form>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
               {!!  $fangattr->addBtn('admin.fangattr.create','添加房源属性') !!}
            </span>
            <div class="mt-20">
                <table class="table table-border table-bordered table-hover table-bg table-sort">
                    <thead>
                    <tr class="text-c">
                        <th width="80">ID</th>
                        <th width="100">房源属性名称</th>
                        <th width="100">房源属性字段名称</th>
                        <th width="100">房源属性图标</th>
                        <th width="100">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($data as $item)
                        <tr class="text-c">
                            <td>{{ $item['id'] }}</td>
                            <td class="text-l">{{ $item['html'] }}{{$item['name']}}</td>
                            <td>{{$item['field_name']}}</td>
                            <td>
                                <img src="{{$item['icon']}}" style="width: 40px">
                            </td>
                            <td class="td-manage">
                                {!! $item['action']!!}
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
        </div>
        @endsection

        @section('js')
            <script>
                $('.editBtn').click(function () {
                    let url = $(this).attr('href');
                    // 模态框发送ajax
                    layer_show('修改角色', url, 800, 300);
                    //阻止默认行为
                    return false;
                })
            </script>
@endsection

